<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
    <title>Order Details</title>
    <style type="text/css">
        <!--
        body {
            font-family: Tahoma;
        }

        img {
            border: 0;
        }

        #page {
            width: 800px;
            margin: 0 auto;
            padding: 15px;

        }

        #logo {
            float: left;
            margin: 0;
        }

        #address {
            height: 100px;
            margin-left: 250px;
        }

        table {
            width: 100%;
        }

        td {
            padding: 5px;
        }

        tr.odd {
            background: #CCC;
        }

        -->
    </style>
</head>
<body>
<div id="page">
    <div id="logo">
        <a href="http://www.anmolcards.net/"><img src="http://www.anmolcards.net/assets/images/logo.png"></a>
    </div>
    <!--end logo-->

    <div id="address">

        <p>Anmol Cards<br>
            <a href="mailto:sales@anmolcards.net">sales@anmolcards.net</a>
            <br><br>
            Order No # <?PHP echo $order->getId(); ?><br>
            Created on <?PHP echo $order->getOrderDate()->format('Y-m-d'); ?><br>
        </p>
    </div>
    <!--end address-->
    <h1 style="color: red; text-align: center;">ORDER CANCELED</h1>

    <div id="content">
        <p>
            Name: <?PHP echo $client->getFirstName() . " " . $client->getLastName(); ?><br>
            Email:<?PHP echo $client->getEmail(); ?></p>
        <hr>
        <table>
            <tbody>
            <tr>
                <td><strong>Description</strong></td>
                <td><strong>Qty</strong></td>
                <td><strong>Unit Price</strong></td>
                <td><strong>Amount</strong></td>
            </tr>
            <?php
                $count = 1;
                $orderTotal = 0;
                foreach($order->getOrderItems() as $item ){
            ?>
            <tr class="<?php if($count % 2 == 0){echo 'odd';}else{echo 'even';}?>">
                <td><?php echo $item->getProduct()->getName(); ?></td>
                <td><?php echo $item->getQuantity(); ?></td>
                <td><?php echo $item->getPrice(); ?></td>
                <td><?php
                    $subTotal = 0;
                    $totalItemPrice = $item->getQuantity() * $item->getPrice();
                    $discount = $item->getDiscount();
                    if ($discount != null && $discount > 0) {
                        $subTotal = $totalItemPrice - ($totalItemPrice * ($discount / 100));
                    } else {
                        $subTotal = $totalItemPrice;
                    }
                    echo $subTotal;
                    $orderTotal += $orderTotal + $subTotal;
                    ?>
                </td>
            </tr>
            <?PHP } ?>
            <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td><strong>Total</strong></td>
                <td><strong><?php echo $orderTotal; ?></strong></td>
            </tr>

            </tbody>
        </table>
        <hr>
        <p>
            Thank you for your order! <br>
            If you have any questions, please feel free to contact us at <a href="mailto:sales@anmolcards.net">sales@anmolcards.net</a>.
        </p>

        <hr>
        <p>
        </p>
        <center>
            <small>This communication is for the exclusive use of
                the addressee and may contain proprietary, confidential or privileged
                information. If you are not the intended recipient any use, copying,
                disclosure, dissemination or distribution is strictly prohibited.
                <br><br>
                 Anmol Cards All Rights Reserved
            </small>
        </center>
        <p></p>
    </div>
    <!--end content-->
</div>
<!--end page-->
</body>
</html>